The correlation matrix constructed in this analysis will be used to compute the correlated price patterns later using Geometric Brownian Motion.
As we can see from the correlation matrix and plots, the Western currencies (AUD, CAD, EUR, GBP) tend to be highly correlated with each other in their movements against the U.S. Dollar, while the Asian currencies exhibit very little correlation.
Theoretically returns should be from a normal distribution to use Geometric Brownian Motion. We can see below that the returns are not normal, but for a simplistic model we’ll use GBM as has been done in several studies modeling exchange rates.
Historical Paths
Below we’ll examine 25-years of historical price paths to serve as a baseline indicator of how volatile exchange rates have been historically.
This will serve as a useful benchmark when we forecast possible exchange rate paths using GBM.
For each country we’ll use their historical daily volalitility as \(\sigma\), and we’ll assume a zero drift rate for all currencies. Financial theory dictates that the differences in each countries respective risk free rate vs. the domestic currency may be used as the drift rate to indicate the cost of holding the one currency compared to the other. For this analysis we won’t be incorporating the risk free rates of return.
GBM Functions
GBM <-function(N, sigma, mu, S0, Wt =NULL) {# Creates a single asset path of daily prices using Geometric Brownian Motion. # One year is 252 days since that is about how many trading days are in any# given year.## Args:# N: Number of days in the path.# sigma: Volatility or standard deviation of daily continuously compounded # returns.# mu: Drift or average daily continuously compounded returns. # S0: The initial price of the asset. # Wt: The cumulative Brownian motion of the model. This can be supplied or # left as NULL. In the case that it is NULL, a vector will be provided.# If you include this argument, it must be a vector of length N of the # cumulative sum of a random variable to work properly. ## Returns:# A vector of length N containing the asset prices generated by the specified# GBM. if (is.null(Wt)) { Wt <-cumsum(rnorm(N, 0, 1)) } t <- (1:N)/252 p1 <- (mu -0.5*(sigma*sigma)) * t p2 <- sigma * Wt St = S0 *exp(p1 + p2)return(St)}CorrelatedGBM <-function(N, S0, mu, sigma, cor.mat) {# Creates a matrix of correlated daily price paths using Geometric # Brownian Motion. ## Args: # N: Number of days in the path.# mu: Drift or average daily continuously compounded returns. # sigma: Volatility or standard deviation of daily continuously compounded # returns. # S0: The initial price of the asset. # cor.mat: The correlation matrix of the daility contiuously compounded # returns. ## Returns:# A matrix of simulated daily price paths of length N having the same number# of assets as in the mu and sigma vectors. Note that mu and sigma must have# the same dimensions. mu <-as.matrix(mu) sigma <-as.matrix(sigma) GBMs <-matrix(nrow = N, ncol =nrow(mu)) Wt <-matrix(rnorm(N *nrow(mu), 0, 1), ncol =nrow(mu)) Wt <-apply(Wt, 2, cumsum) chol.mat <-chol(cor.mat) # upper triangular cholesky decomposition Wt <- Wt %*% chol.mat # key trick for creating correlated pathsfor (i in1:nrow(mu)) { GBMs[,i] <-GBM(N, sigma[i], mu[i] , S0[i], Wt[, i]) }return(GBMs)}